<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link href="/static/static/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="/static/static/h-ui.admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="/static/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="/static/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="/static/static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script><![endif]-->

<link href="/static/lib/lightbox2/2.8.1/css/lightbox.css" rel="stylesheet" type="text/css" >
<title>图片展示</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
	<span class="c-gray en">&gt;</span>
	图片管理
	<span class="c-gray en">&gt;</span>
	图片展示
	<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="pd-20">
	<div class="cl pd-5 bg-1 bk-gray mt-20">
		<span class="l">
		<a href="javascript:;" onclick="add('添加图片','img_add.html?rid={$data.rid}')" class="btn btn-success radius"><i class="Hui-iconfont">&#xe6df;</i> 添加图片</a>
		<a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
		</span>
		<span class="r">共有数据：<strong>{empty name='data["img"]'}0{else}{$count}{/empty}</strong> 条</span>
	</div>
	<div class="portfolio-content">
		<ul class="cl portfolio-area">
			{empty name='data["img"]'}
				<div class="textbox">暂无数据 </div>
		    {else /}
		    	{foreach name='imgs' item='img' key='k'}
		        <li class="item">
					<div class="portfoliobox">
						<input class="checkbox" name="img[]" type="checkbox" value="{$img}">
						<div class="picbox">
							<a href="/static/upload/owner/{$img}" data-lightbox="gallery" data-title="客厅1"><img class='' src="/static/upload/owner/{$img}"></a>
						</div>
						<div class="textbox">客厅 </div>
					</div>
				</li>
				{/foreach}
		    {/empty}
		</ul>
	</div>
</div>

<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="/static/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="/static/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/static/static/h-ui/js/H-ui.js"></script> 
<script type="text/javascript" src="/static/static/h-ui.admin/js/H-ui.admin.page.js"></script>
<!--/_footer /作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/static/lib/lightbox2/2.8.1/js/lightbox.min.js"></script>
<script type="text/javascript">
$(function(){
	$.Huihover(".portfolio-area li");
});
//添加图片
function add(title,url){
	//layer_show(title,url,'550','300');
	layer.open({
		type: 2,
		area: ['550px', '300px'],
		fix: false, //不固定
		maxmin: true,
		shade:0.4,
		title: title,
		content: url,
		end: function () {
                location.href = "{:url('renter_show')}?rid={:input('get.rid')}";
            }
	});
}
//批量删除图片
function datadel(){
	var arr =new Array();
	$('input[type=checkbox]:checked').each(function(k,v){
		arr[k] = v.defaultValue;	
	});
	$.ajax({
        type:'post',
        url:'{:url('admin/Renter/do_del')}?rid={:input('get.rid')}',
        data:'data='+JSON.stringify(arr),
        dataType:'json',
        success:function(res){
        	layer.msg('删除成功',{icon:1,time:1000},function(){
        		location.reload();
        	});
           
        }
    });	
}
</script>
</body>
</html>